﻿<!Doctype html>  
<html lang="en">  
 <head>  
  <meta charset="UTF-8">  
  <title>Window对象的三种对话框</title>  
 </head>  
 <body>  
<script type="text/javascript">  
var yourname = prompt("您的姓名是：","小王");
if(confirm("您确定吗？") == true){
	alert(yourname+"先生，您好！")
}
</script>  
 </body>  
</html> 